1. Technical Field
The present invention relates to memory management of a computer system, and particularly, to memory management realizing efficient memory allocation suitable for a NAS (Network Attached Storage) system.
2. Description of Related Art
Heretofore, a variety of computer systems including various types of hardware (terminals) interconnected through a network have been utilized. Among such computer systems, there is a system using a storage device (NAS: Network Attached Storage) to be used by being directly connected to the network. In this system, the NAS is made to function as an independent file server capable of allowing a data file (hereinafter, simply referred to as a file) to be shared among clients and the like through the network, and is adapted to be accessible from and usable by the clients on the network.
FIG. 7 is a diagram schematically showing a general configuration of a NAS server. As shown in FIG. 7, the NAS sever 700 includes the hard disk device (HDD) 701 as storing means, the file system 702 as managing means for the file, which is realized as a function such as a CPU controlled by a program, and the network interface 703 for realizing a network communication function. An exemplary file system 702 may be the JFS (Journal File System) from International Business Machines Corporation.
Having received a read request from a client through the network interface 703, the NAS server 700 reads data from the hard disk device 701 under the management of the file system 702. Then, the NAS server 700 returns the read data as a response to the client through the network interface 703. Moreover, the NAS server 700, having received a write request from a client, writes data into the hard disk device 701 under the management of the file system 702, and notifies a completion of the write as a response to the client after the write is finished.
To improve the performance of NAS server 700, heretofore a write cache has been provided in the NAS server 700. In data write operations, it takes an extended amount of time to write the data into the hard disk device 701 due to the mechanical nature of the hard disk device 701. Accordingly, a high-speed semiconductor memory (hereinafter, referred to as a cache memory) is often used as a write cache of the file system 702. The NAS server 700 temporarily stores the write data sent from the client in the cache memory, and at this point, notifies the client of the write completion. In such a way, the client recognizes the write completion, thus making it possible for the client to move to another process without waiting for an actual completion of the write processing into the hard disk device 701.
Moreover, the NAS server 700 writes the data accumulated in the cache memory in a way as described above into the hard disk in accordance with a load status of the hard disk device 701. By performing such control, processing efficiency of the NAS server 700 itself can be enhanced, and the performance thereof can be improved.
Furthermore, in order to avoid losing the data accumulated in the cache memory when the NAS server 700 is down due to a cause such as an unexpected accident, a non-volatile memory such as a flash memory has been used as this cache memory. In the case of using NFS as the file system 702, the non-volatile memory will be necessarily used for the cache memory because rules on protocol determine that a response to a client for a write request shall be returned after recording data in a non-volatile recording medium (Stable Storage).
One example of the NAS server 700 as described above is a RAID (Redundant Array of Independent (Inexpensive) Disks) system, which disperses accesses by use of a plurality of hard disk devices in combination to achieve improvements of a processing speed and reliability. Also in this RAID system, the improvement of the performance has been achieved by providing the cache memory as non-volatile memory.
As described above, the cache memory using the non-volatile memory has been generally provided in the NAS server, and as introduction methods thereof, there have been heretofore adopted a method for introducing the cache memory as a write cache of a file system, and a method for introducing the cache memory as a cache of the RAID system.
However, there has been a problem as below in the case of introducing the cache memory as the write cache of the file system. Specifically, in order that the file system utilizes the non-volatile memory as the write cache, it is necessary that the file system itself be designed to be capable of using the write cache. However, the file system for which various functions such as clustering, failover and snapshot are required already has a very complicated structure today. Therefore, it costs an enormous amount to change the existing file system and introduce the write cache. In the case of a software product realizing the NAS server, it is not preferable that the file system be changed to a great extent in order to introduce the write cache so as to meet specific hardware because a burden in terms of development cost is large. Moreover, for a vendor purchasing such software and selling the software in combination with hardware of his own, it is difficult to change the file system for reasons of technology and contract.
Furthermore, when the hardware in which the file system operates fails, this cache memory also becomes unusable simultaneously. Therefore, it is difficult for another device to access this cache and acquire the accumulated data for the purpose of maintenance and the like.
Meanwhile, in the case of utilizing the non-volatile memory as a part of a disk system as in the RAID system, it is possible for the file system to utilize the non-volatile memory completely transparently, and therefore, such a problem as inherent in the foregoing case of introducing the non-volatile memory as the write cache of the file system does not occur. However, there has been a problem as below even in this case. Specifically, in the case of introducing the non-volatile memory as the cache memory of the RAID system, operation requests (read and write requests) from the client are recorded in the cache memory on the RAID after processings thereof in the file system, a buffer system and a disk driver are finished. For this reason, great performance improvements in a response time to the client and a throughput of the NAS server itself cannot be expected.
In addition, the write request from the client affects a wider range of the file as processes are increased. Hence, when a large number of steps are performed before the write request is recorded in the cache memory, a required memory capacity for one write processing is increased, and thus utilization efficiency of the cache memory is reduced.